Skip to content

Conversation

@keith-turner
Copy link
Contributor

When the property general.vfs.classpaths was not set VFS was still unnecessarily initialized. Modified to only initialized VFS when the property is actually set.

Tested locally by setting general.vfs.classpaths=, general.dynamic.classpaths=,
general.context.class.loader.factory=TestCL. Where TestCL is a classloader that does nothing. When all of these are set did not see VFS create anything in local filesystem. Had to set some props to empty string because mini accumulo would set them otherwise. Also added some debug logging if VFS was initialized and did not see that. Removed that logging from these changes.

When the property `general.vfs.classpaths` was not set VFS was still
unnecessarily initialized.  Modified to only initialized VFS when the
property is actually set.

Tested locally by setting `general.vfs.classpaths=`,
`general.dynamic.classpaths=`,
`general.context.class.loader.factory=TestCL`. Where TestCL is a
classloader that does nothing.  When all of these are set did not see
VFS create anything in local filesystem. Had to set some props to empty
string because mini accumulo would set them otherwise.  Also added some
debug logging if VFS was initialized and did not see that.  Removed that
logging from these changes.
@keith-turner keith-turner added this to the 2.1.5 milestone Jan 29, 2026
synchronized (lock) {
if (loader == null) {

FileSystemManager vfs = generateVfs();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main thing this PR is doing is avoiding always calling this.

Copy link
Contributor

@dlmarion dlmarion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct. ITs should confirm.

@keith-turner
Copy link
Contributor Author

successfully ran mvn verify -Psunny

@keith-turner keith-turner merged commit f7aa548 into apache:2.1 Jan 29, 2026
8 checks passed
@keith-turner keith-turner deleted the avoid-vfs-create branch January 29, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants